Package com.cisco.pt.ipc.sim.impl
Class TerminalLineImpl
java.lang.Object
com.cisco.pt.ipc.impl.IPCObjectImpl
com.cisco.pt.ipc.sim.impl.TerminalLineImpl
- All Implemented Interfaces:
IPCObject,TerminalLine
- Direct Known Subclasses:
ConsoleLineImpl,VirtualLineImpl
Information provided by the PKI file:
\class TerminalLine
\brief TerminalLine manages the terminal lines, virtual terminal lines, and console lines.
\example network().getDevice("Router0").getCommandLine()
- Author:
- Auto-generated
-
Field Summary
Fields inherited from class com.cisco.pt.ipc.impl.IPCObjectImpl
accessMessage, ipcFactory, packetTracerSession -
Constructor Summary
ConstructorsConstructorDescriptionTerminalLineImpl(IPCFactory ipcFactory, PacketTracerSession packetTracerSession, IPCMessageLTV accessMessage) -
Method Summary
Modifier and TypeMethodDescriptionvoidenterChar(Byte ascii, SpecialChar specialChar) Information provided by the PKI file:voidenterCommand(String commandStr) Information provided by the PKI file:voidflush(int lineCount) Information provided by the PKI file:Information provided by the PKI file:Information provided by the PKI file:Information provided by the PKI file:Information provided by the PKI file:Information provided by the PKI file:intInformation provided by the PKI file:getMode()Information provided by the PKI file:getName()Information provided by the PKI file:Information provided by the PKI file:Information provided by the PKI file:Information provided by the PKI file:intgetSpeed()Information provided by the PKI file:Information provided by the PKI file:getTelnetClientAt(int index) Information provided by the PKI file:intInformation provided by the PKI file:Information provided by the PKI file:voidInformation provided by the PKI file:voidsetSettings(int speed, String bits, Parity parity, String stopbits, FlowControl flowcontrol) Information provided by the PKI file:Methods inherited from class com.cisco.pt.ipc.impl.IPCObjectImpl
getAccessMessage, getClassName, getFactory, getObjectUUID, getPacketTracerSession, sendMessage, sendMessageWithReturn, translateToCommandStatusStringPairMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.cisco.pt.ipc.IPCObject
getAccessMessage, getClassName, getFactory, getObjectUUID, getPacketTracerSession
-
Constructor Details
-
TerminalLineImpl
public TerminalLineImpl(IPCFactory ipcFactory, PacketTracerSession packetTracerSession, IPCMessageLTV accessMessage)
-
-
Method Details
-
getName
Information provided by the PKI file:
\brief Returns the name of this terminal line. \return string, the name of this terminal line.- Specified by:
getNamein interfaceTerminalLine- Returns:
- String Returns a String
-
getOwnerDevice
Information provided by the PKI file:
\brief Returns the owner device of this terminal line. \return Device, the device that owns this terminal line.- Specified by:
getOwnerDevicein interfaceTerminalLine- Returns:
- Device Returns a Device
-
getMode
Information provided by the PKI file:
\brief Returns the mode this terminal line is in. \return string, the mode this terminal line is in.- Specified by:
getModein interfaceTerminalLine- Returns:
- String Returns a String
-
getPrompt
Information provided by the PKI file:
\brief Returns the prompt of this terminal line. \return string, the prompt of this terminal line.- Specified by:
getPromptin interfaceTerminalLine- Returns:
- String Returns a String
-
getUserHistory
Information provided by the PKI file:
\brief Returns the user history of this terminal line. \return CommandHistory, the CommandHistory object.- Specified by:
getUserHistoryin interfaceTerminalLine- Returns:
- CommandHistory Returns a CommandHistory
-
getConfigHistory
Information provided by the PKI file:
\brief Returns the config history of this terminal line. \return CommandHistory, the CommandHistory object.- Specified by:
getConfigHistoryin interfaceTerminalLine- Returns:
- CommandHistory Returns a CommandHistory
-
getCurrentHistory
Information provided by the PKI file:
\brief Returns the current history of this terminal line. \return CommandHistory, the CommandHistory object.- Specified by:
getCurrentHistoryin interfaceTerminalLine- Returns:
- CommandHistory Returns a CommandHistory
-
getHistorySize
public int getHistorySize()Information provided by the PKI file:
\brief Returns the history size. \return int, the history size.- Specified by:
getHistorySizein interfaceTerminalLine- Returns:
- int Returns a int
-
getCommandInput
Information provided by the PKI file:
\brief Returns the command input. \return string, the command input.- Specified by:
getCommandInputin interfaceTerminalLine- Returns:
- String Returns a String
-
getTelnetClientCount
public int getTelnetClientCount()Information provided by the PKI file:
\brief Returns the number of telnet clients. \return int, the number of telnet clients.- Specified by:
getTelnetClientCountin interfaceTerminalLine- Returns:
- int Returns a int
-
getTelnetClientAt
Information provided by the PKI file:
\brief Returns the telnet client at the specified index. \param index, the index of the telnet client of interest. \return TelnetClientProcess, the TelnetClientProcess object at the specified index.- Specified by:
getTelnetClientAtin interfaceTerminalLine- Parameters:
index- Takes in a parameter of index- Returns:
- TelnetClientProcess Returns a TelnetClientProcess
-
enterCommand
Information provided by the PKI file:
\brief Enters a command to the terminal line.- Specified by:
enterCommandin interfaceTerminalLine- Parameters:
commandStr- Takes in a parameter of commandStr
-
enterChar
Information provided by the PKI file:
\brief Enters the specified ascii or special character into the terminal. \param ascii, any ASCII character. Includes: Backspace = 8 Ctrl+C = 3 Ctrl+Z = 26 Ctrl+Shift+6 = 30 Enter = 13 Line Feed = 10 Tab = 9 Question = '?' Space = ' ' Ctrl+B = 2 Ctrl+F = 6 Ctrl+P = 16 Ctrl+N = 14 Ctrl+A = 1 Ctrl+E = 5 Ctrl+U = 21 \param SpecialChar, a special character key. Special characters: eNoChar = 0, eArrowRight = 1, eArrowLeft, eArrowUp, eArrowDown \remark If ascii is 0, then specialChar will be examined.- Specified by:
enterCharin interfaceTerminalLine- Parameters:
ascii- Takes in a parameter of asciispecialChar- Takes in a parameter of specialChar
-
setSettings
public void setSettings(int speed, String bits, Parity parity, String stopbits, FlowControl flowcontrol) Information provided by the PKI file:
\brief Sets the connection settings to this terminal \param int speed, any Speed setting of either: 1200, 2400, 4800, 9600, 19200, 38400, 57600, 115200 \param char bits, The number of data bits, from 5 to 8, inclusive \param Parity parity, The parity mode, even, odd, none, mark, space \param string stopbits, The stop bits, 1, 1.5, or 2 \param FlowControl flowcontrol, The flow control method, Xon/Xoff, Hardware, None- Specified by:
setSettingsin interfaceTerminalLine- Parameters:
speed- Takes in a parameter of speedbits- Takes in a parameter of bitsparity- Takes in a parameter of paritystopbits- Takes in a parameter of stopbitsflowcontrol- Takes in a parameter of flowcontrol
-
getSpeed
public int getSpeed()Information provided by the PKI file:
This function gets the baud rate.- Specified by:
getSpeedin interfaceTerminalLine- Returns:
- int Returns a int
-
getDataBits
Information provided by the PKI file:
This function gets the data bits.- Specified by:
getDataBitsin interfaceTerminalLine- Returns:
- Byte Returns a Byte
-
getParity
Information provided by the PKI file:
\param[in] parity a parity bit value This function sets the parity bit.- Specified by:
getParityin interfaceTerminalLine- Returns:
- Parity Returns a Parity
-
getStopBits
Information provided by the PKI file:
This function gets the stop bits.- Specified by:
getStopBitsin interfaceTerminalLine- Returns:
- String Returns a String
-
getFlowControl
Information provided by the PKI file:
This function gets the flow control.- Specified by:
getFlowControlin interfaceTerminalLine- Returns:
- FlowControl Returns a FlowControl
-
println
Information provided by the PKI file:
\brief This function gets the flow control. \param output, the output string to be printed to terminal line- Specified by:
printlnin interfaceTerminalLine- Parameters:
output- Takes in a parameter of output
-
flush
public void flush(int lineCount) Information provided by the PKI file:
\brief This function remove the first number of lines in the buffer \param lineCount, the number of lines to be removed- Specified by:
flushin interfaceTerminalLine- Parameters:
lineCount- Takes in a parameter of lineCount
-